package com.hdu.treeUtils;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class People {
    private Long id;
    private Long pId;
    private String name;
    private Integer rank = 0;
    private List<People> subMenus = new ArrayList<>();


    public static People of(Long id, Long pId, int rank, String name) {
        People people = new People();
        people.setId(id);
        people.setPId(pId);
        people.setRank(rank);
        people.setName(name);
        return people;
    }
}

